﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace smforj.common.model
{

    /// <summary>
    /// 商品类型
    /// </summary>
    public class CommodityType : IData
    { 
        // id
        public String id { get; set; }
        // 商品类型名字
        public String name { get; set; }
        // 状态：0：下线 1：上线
        public Boolean status { get; set; }
        // 更新时间
        public String updateDate { get; set; }
        // 创建时间
        public String createDate { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int order { get; set; } 

    }

    /// <summary>
    /// 商品信息对象
    /// </summary>
    public class Commodity :IData
    {
        public String id { get; set; }
        /// <summary>
        /// RFID
        /// </summary>
        public String rfid { get; set; }

        public String name { get; set; }
        /// <summary>
        /// 商品类型
        /// </summary>
        public String type { get; set; }

        /// <summary>
        /// 图片信息
        /// </summary>
        public String image { get; set; }
    }


    public class CommoditysResponse : JResponse
    {
        public Commodity[] data;

        public override IData[] GetData()
        {
            return data;
        }
    }

    public class CommodityResponse
    {
        public Boolean isSuccess { get; set; }
        public int errorCode { get; set; }
        public String message { get; set; }
        public Commodity data;

        public IData GetData()
        {
            return data;
        }
    } 

    public class CommodityTypeResponse : JResponse
    {
        public CommodityType[] data;

        public override IData[] GetData()
        {
            return data;
        }
    }
}
